package com.gzz.orchid.context.application.inventory;

import com.gzz.orchid.common.core.model.ActionCmd;
import com.gzz.orchid.context.application.inventory.command.PurchaseSaveCmd;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author higmd
 */
public interface IPurchaseExecutor {
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void save(PurchaseSaveCmd saveCmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void delete(ActionCmd cmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void disable(ActionCmd cmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void enable(ActionCmd cmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void audit(ActionCmd cmd);
}
